package cn.itcast.travel.web.servlet.admin;

import cn.itcast.travel.service.AdminService;
import cn.itcast.travel.service.impl.AdminServiceImpl;
import com.fasterxml.jackson.databind.ObjectMapper;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(name = "canpubblog", value = "/canpubblog")
public class canpubblog extends HttpServlet {
    AdminService service=new AdminServiceImpl();
    //修改用户权限
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String which=request.getParameter("which");
        String id=request.getParameter("id");
        service.xiugairight(which,id);
        ObjectMapper ob=new ObjectMapper();
        ob.writeValue(response.getWriter(),1);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
